package com.youxin.busfoundation.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;


/**
 * 报警配置信息
 * @author yingde.cao
 *
 */
@Configuration
@PropertySource("classpath:${spring.profiles.active}/monitor.properties")
@ConfigurationProperties(prefix="monitor.message")
public class MonitorAlarmConfig extends MonitorBaseBean{
	
	private static MonitorAlarmConfig config=null;
	private static Object lockObj=new Object();
	public static void initConfig(MonitorAlarmConfig conf)
	{
		if(config==null)
		{
			synchronized (lockObj) {
				if(config==null)
				{
					config=conf;
				}
			}
		}
	}
	
	public static MonitorAlarmConfig instance(){
		return config;
	}
	
}
